const sumSize  = (size, current) => (size += current)

function composeSize (fileSize) {
	fileSize = fileSize / 1024
	if (fileSize < 1024) {
		return `${fileSize.toFixed(1)} KB`
	} else {
		return `${(fileSize / 1024).toFixed(1)} MB`
	}
}

module.exports = {
	sumSize,
	composeSize
}
